home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Original Shareware 1.1
/
The Original Shareware (WeMake CDs)(Volume 1.1)(CDs, Inc)(1993).iso
/
32
/
abermud.zip
/
OPENSYS.C
< prev
next >
Wrap
C/C++ Source or Header
|
1989-07-08
|
683b
|
31 lines
/* Fast File Controller v0.1 */
#include <stdio.h>
FILE *filrf=NULL; /* - = not open */
extern FILE *openlock();
closeworld()
{
extern FILE *filrf;
extern long objinfo[],numobs,ublock[];
if(filrf==NULL) return;
sec_write(filrf,objinfo,400,4*numobs);
sec_write(filrf,ublock,350,16*48);
fcloselock(filrf);
filrf= NULL;
}
FILE *openworld()
{
extern FILE *filrf;
extern long objinfo[],numobs,ublock[];
if(filrf!=NULL) return(filrf);
filrf=openlock("/usr/tmp/-[iy7]|AM","r+");
if(filrf==NULL)
crapup("Cannot find World file");
sec_read(filrf,objinfo,400,4*numobs);
sec_read(filrf,ublock,350,16*48);
return(filrf);
}